-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: erc721 holder statistic + erc721 total supply #905
Conversation
src/services/evm/erc721_reindex.ts
Outdated
const activities = await Erc721Handler.getErc721Activities( | ||
0, | ||
height, | ||
this.logger, | ||
[address], | ||
trx | ||
); | ||
await Erc721Handler.updateErc721(activities, tokens, trx); | ||
const erc721HolderStats: Dictionary<Erc721HolderStatistic> = | ||
tokens.reduce((acc: Dictionary<Erc721HolderStatistic>, curr) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forEach dễ nhìn hơn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolve
src/services/evm/erc721_reindex.ts
Outdated
await Erc721Contract.query() | ||
const [tokens, height] = await this.getCurrentTokens(address); | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore lỗi gì thế?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typescript define sai type. Nó define return là Erc721Contract nhưng hàm return mảng Erc721Contract[] vì insert nhiều phần tử ạ
Erc721 holder statistic:
Erc721 total supply